<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <title>燃情世界杯</title>
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/index.css">
    <script src="js/jquery-1.11.3.min.js"></script>
    <script src="js/zepto.min.js"></script>
    <script src="js/script.js"></script>
    <script src="js/iscroll-zoom.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/dom-to-image/2.6.0/dom-to-image.js"></script>
    <!--[if lt IE 9]>
    <script src="js/html5shiv.min.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->
    <style>
            .bill_nt{
            font-size: 0.25rem;
            width: 5.9rem;
            margin: auto;
            -webkit-border-radius: 0.2rem;
            -moz-border-radius: 0.2rem;
            border-radius: 0.2rem;
            -webkit-box-shadow: 0 0 10px rgba(163, 163, 170,0.44);
            -moz-box-shadow: 0 0 10px rgba(163, 163, 170,0.44);
            box-shadow: 0 0 10px rgba(163, 163, 170,0.44);
            overflow: hidden;

        }
        .bill_nt img{
            width: 100%;
            position: static;
        }
        body {
  font-variant: small-caps;
}
    </style>
</head>

<body>
    <div class="bg" style="background-image: url('images/index/mohu.jpg')">
        <div class="bill">
            <div class="bill_inner">
                <div id="orgchart">
                    <div class="bill_cont">
                        <div class="bill_top">
                                <img src="images/index/aaa.jpg" alt="" />
                                <img src="images/index/1.jpg" alt="" />
                        </div>
                        <div class="bill_bottom">
                            <div class="bill_img">
                                <img src="images/index/erweima.png" alt="" />
                            </div>
                            <div class="bill_text">
                                <div>
                                    <h2>给你力量，给我希望</h2>
                            
                                </div>

                            </div>
                            <div class="bill_nt_text">
                                    <p> 长按保存图片</p>
                                </div>
                        </div>
                    </div>
               </div>
                <div class="bill_cont">
                    <div class="bill_top">
                        <img src="" alt="" id="haibaoimg" />
                    </div>
                    <div class="bill_bottom">
                        <div class="bill_img">
                            <img src="images/index/erweima.png" alt="" />
                        </div>
                        <div class="bill_text">
                            <div>
                                <h2 id="haibaomsg">
                                   
                                </h2>
                                <p> @洁洁洁洁 </p>
                            </div>

                        </div>
                    </div>
                </div>
                <div class="slogan_btn bill_btn">
                    <a href="slogan.html"> 返 回 </a>
                    <a href="javascript:;" class="chou"> 参与抽奖 </a>
                    <a href="javascript:;" class="fx"> 分 享</a>
                </div>
            </div>
        </div>
    </div>

    <!--弹出框礼物-->
    <div class="tailoring-container project">
        <div class="tailoring-contents">
            <div class="liwu">
                <img src="images/index/liw.png" alt="" />
                <h3></h3>
                <div class="slogan_btn liwu_btn">
                    <a href="javascript:;">填写资料</a>
                </div>
                <div class="liwu_close">
                    <i></i>
                </div>
            </div>
        </div>
    </div>
    <!--弹出框提交信息-->
    <div class="tailoring-container refer">
        <div class="tailoring-contents">
            <div class="refer_inner">
                <div class="refer_cont">
                    <div class="refer_tit">
                        <img src="images/index/title.png" alt="" />
                    </div>
                    <div class="refer_tit_p">
                        <p>为方便奖品快递送达您的手中
                            请如实填写一下信息</p>
                    </div>
                    <form action="">
                        <ul>
                            <li>
                                <div class="refer_lf">
                                    姓名
                                </div>
                                <div class="refer_rt">
                                    <input type="text" name='name' />
                                </div>
                            </li>
                            <li>
                                <div class="refer_lf">
                                    电话
                                </div>
                                <div class="refer_rt">
                                    <input type="number" name="phone" />
                                </div>
                            </li>
                            <li class="yan">
                                <input type="text" name="yzm" placeholder="请输入验证码">

                                <img src="/admin/yzm.php" onclick="this.src='/admin/yzm.php?'+new Date().getTime();"
                                    title="点击刷新验证码" />
                            </li>
                            <li class="zheng">
                                <input type="text" placeholder="请输入手机验证码" name="code_msg" />
                                <span> 获取验证码 </span>
                            </li>
                            <li class="sle">
                                <script class="resources library" src="js/area.js" type="text/javascript"></script>
                                <select id="s_province" name="s_province" class="selfgz"></select>
                                <select id="s_city" name="s_city" class="selfgz"></select>
                                <select id="s_county" name="s_county" class="selfgz"></select>
                                <script type="text/javascript">
                                    _init_area();
                                </script>
                            </li>
                            <li class="qll">
                                <div class="refer_lf">
                                    填写详细地址
                                </div>
                                <br />
                                <textarea name="msg" id="" cols="30" rows="10"></textarea>
                            </li>
                        </ul>
                        <div class="refer_btn">
                            <a href="javascript:;"> <img src="images/index/bbtt.png" alt="" /> </a>
                        </div>
                    </form>
                    <div class="refer_close">
                        <i></i>
                    </div>
                </div>

            </div>
        </div>
    </div>
    <!--弹出框分享-->
    <div class="tailoring-container share">
        <div class="tailoring-contents">
            <div class="share_inner">
                <img src="images/index/share.png" alt="" />
            </div>
        </div>
    </div>


</body>
<script src="js/index.js"></script>
<!-- <script type="text/javascript" src="//js.users.51.la/20857273.js"></script> -->

<!-- 二维码分享 -->
<script type="text/javascript">
       
   
</script>
<script language="JavaScript">
    let haibaomsg = window.sessionStorage.getItem(3);
    $("#haibaomsg").html(haibaomsg);
    $("#haibaoimg").attr('src', window.sessionStorage.getItem(4));
    $(".fx").click(function () {
        $('.share').show();
            // var node = document.getElementById('orgchart');
            // domtoimage.toPng(node,{ quality: 1 })
            //     .then(function (dataUrl) {
            //         var img = new Image();
            //         img.src = dataUrl;
            //         document.body.appendChild(img);
            //     })
            //     .catch(function (error) {
            //         console.error('oops, something went wrong!', error);
            //     });
    });
    $(".liwu_close i").click(function () {
        $('.project').hide();
    });
    $(".liwu_btn a").click(function () {
        $('.project').hide();
        $('.refer').show();
    });
    $(".refer_close i").click(function () {
        $('.refer').hide();
    })
    $(function () {
        // url
        let domain = 'https://xcx.z.trst.cn/admin/';
        let token = '13cfe51b32d00ee8c267e0aaee5d7e06';
        //    后台交互抽奖
        let flag = true;
        $('.chou').click(function () {
            if (flag) {
                $.ajax({
                    type: "post",
                    dataType: "json",
                    url: domain + "?c=index&a=jp_suoyoujp",
                    data: {
                        'token': token
                    },
                    headers: {
                        'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
                    },
                    timeout: 15000,
                    success: function (json) {
                        console.log(json)
                        if (json.code == 0) {
                            let msg = json.msg;
                            $('.liwu h3').html(msg);
                            $('.qll').attr('data', msg);
                            $('.project').show();
                        }
                    }
                });
                flag = false;
            } else {
                $('.project').show();
            }

        });
        //    后台交互验证码
        $('.zheng span').click(function () {
            let phone = $('input[name="phone"]').val();
            let yzm = $('input[name="yzm"]').val();
            $.ajax({
                type: "post",
                dataType: "json",
                url: domain + "?c=h&a=ajax_sendMessag",
                data: {
                    'token': token,
                    'phone': phone,
                    'yzm': yzm,
                },
                headers: {
                    'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
                },
                timeout: 15000,
                success: function (json) {
                    console.log(json)
                    if (json.success == 0) {
                        alert(json.msg);
                    } else {
                        alert(json.msg);
                    }
                }
            });
        });
        //    后台交互提交信息
        $('.refer_btn img').click(function () {
            let phone = $('input[name="phone"]').val();
            let yzm = $('input[name="yzm"]').val();
            let name = $('input[name="name"]').val();
            let code_msg = $('input[name="code_msg"]').val();
            let msg = $('textarea[name="msg"]').val();
            let jptitle = $('.qll').attr('data');
            let city_one = $('select[name="s_province"]').val();
            let city_two = $('select[name="s_city"]').val();
            let city_three = $('select[name="s_county"]').val();
            let data = {
                'token': token,
                'phone': phone,
                'name': name,
                'code_msg': code_msg,
                'msg': msg,
                'jptitle': jptitle,
                'city_one': city_one,
                'city_two': city_two,
                'city_three': city_three,
                'yzm': yzm,
            };
            console.log(data);
            $.ajax({
                type: "post",
                dataType: "json",
                url: domain + "?c=h&a=ajax_tijiao",
                data: {
                    'token': token,
                    'phone': phone,
                    'name': name,
                    'code_msg': code_msg,
                    'msg': msg,
                    'jptitle': jptitle,
                    'city_one': city_one,
                    'city_two': city_two,
                    'city_three': city_three,
                    'yzm': yzm,
                },
                headers: {
                    'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
                },
                timeout: 15000,
                success: function (json) {
                    console.log(json)
                    if (json.code == 0) {
                        alert(json.msg);
                        $('.refer').hide();
                        $('.share').show();
                        //显示隐藏
                    } else {
                        alert(json.msg);
                    }
                }
            });
        });
        $(".share").click(function () {
            $('.refer').hide();
            $('.share').hide();
        })
    });
</script>

</html>